package com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer;

import com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.dto.AppletCustomerFollowListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.param.AppletCustomerFollowCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.param.AppletCustomerFollowDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.param.AppletCustomerFollowListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.param.AppletCustomerFollowUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 客户跟进
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"Customer Follow management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-APPLET", fallback = AppletCustomerFollowCloudServiceFallback.class)
@RequestMapping("/applet/customer/follow")
public interface AppletCustomerFollowCloudService {

    // 查询客户跟进列表
    @ApiOperation(value = "Query CustomerFollow List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.AppletCustomerFollowCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = AppletCustomerFollowListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query CustomerFollow List", dataType = "AppletCustomerFollowListCloudParam", dataTypeClass = AppletCustomerFollowListCloudParam.class),
    })
    @GetMapping
    public abstract AppletCustomerFollowListCloudDto list(AppletCustomerFollowListCloudParam param);

    
    // 创建客户跟进
    @ApiOperation(value = "Create CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.AppletCustomerFollowCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create CustomerFollow", dataType = "AppletCustomerFollowCreateCloudParam", dataTypeClass = AppletCustomerFollowCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody AppletCustomerFollowCreateCloudParam param);


    // 编辑客户跟进
    @ApiOperation(value = "Update CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.AppletCustomerFollowCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update CustomerFollow", dataType = "AppletCustomerFollowUpdateCloudParam", dataTypeClass = AppletCustomerFollowUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody AppletCustomerFollowUpdateCloudParam param);


    // 删除客户跟进
    @ApiOperation(value = "Delete CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.applet.crm.customer.AppletCustomerFollowCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete CustomerFollow", dataType = "AppletCustomerFollowDeleteCloudParam", dataTypeClass = AppletCustomerFollowDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(AppletCustomerFollowDeleteCloudParam param);

}
